package com.itheima.zy;


import java.util.Random;
import java.util.Scanner;

public class Test7 {
    public static void main(String[] args) {
        Random rand = new Random();
        int num = rand.nextInt(10) + 1;

        System.out.println("猜我是几：");
        Scanner sc = new Scanner(System.in);
        while (true){
            int a = sc.nextInt();
            if (a > num){
                System.out.println("大了");
            }else if (a < num){
                System.out.println("小了");
            } else {
                System.out.println("对了");
                break;
            }
        }




    }
}
